package com.study.jvm.stringtable;

/**
 * -Xmx10m  设置堆内存大小10m
 * -XX:+PrintStringTableStatistics 打印stringtable分析
 * -XX:+PrintGCDetails 打印垃圾回收详细信息
 * -verbose:gc
 * -XX:StringTableSize=1024 设置stringTable桶的大小
 */
public class StringTableGc {
    public static void main(String[] args) {
        try{
            //1611  1711
            for (int i=0;i<100000;i++){
                String.valueOf(i).intern();
            }
        }catch (Throwable throwable){
            throwable.printStackTrace();
        }
    }
}
